<?

include_once "includes/config.php";
include_once "includes/utilities.php";
$link = OpenDB();

function GetSelected($query)
{
    $result = mysql_query($query);
    if ($result)
    {
        for ($i = 0; $i < mysql_num_rows($result); $i++)
        {
            $ret[mysql_result($result, $i)] = true;
        }
        return isset($ret) ? $ret : false;
    }
    else
        return false;
}

$codigo = mysql_real_escape_string($_GET["codigo"]);
$query = "select codigo_diagnostico_pap from template_pap_diagnostico_pap where codigo = '" . $codigo . "'";
$diagnostico = GetSelected($query);
include "papDiagnostico.php";
CloseDB($link);
?>
